using Microsoft.AspNetCore.Mvc;
using StudyCompanion.Commons.Result;
using StudyCompanion.Core.API;
using StudyCompanion.Entity.System;
using StudyCompanion.IServices;

namespace StudyCompanion.WebApi.Controllers;

/// <summary>
/// 充值卡
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class RefillCardController : ApiController
{
    private readonly IRefillCardService _refillCardService;

    /// <summary>
    ///     订单服务
    /// </summary>
    /// <param name="refillCardService"></param>
    public RefillCardController(IRefillCardService refillCardService)
    {
        _refillCardService = refillCardService;
    }

    /// <summary>
    ///     充值卡
    /// </summary>
    /// <returns></returns>
    [HttpGet("RefillCardList")]
    public CommonResult<List<ChargeCard>> RefillCardList()
        => _refillCardService.RefillCardList();
}